package com.qkl.xiatang.app.utils.appenum;

import lombok.Getter;

import java.util.*;

@Getter
public enum MessageTypeEnum {

    WEIGH_FEED(14,"称饲料"),
    FEED(11,"喂饲料"),
    CHECK(13,"查料台"),

    WEIGH_ZOO(24,"称动保"),
    ZOO(21,"打动保"),

    ADMIN(0,"系统消息"),
    ;

    private MessageTypeEnum(Integer type,String name){
        this.type = type;
        this.name = name;
        EnumUtil.typeMap.put(type,this);
    }



    private Integer type;

    private String name;

    public static List<Integer> allTypeList(){
        List<Integer> typeList = new ArrayList<>();
        typeList.addAll(EnumUtil.typeMap.keySet());
        return typeList;
    }

    private static  class EnumUtil{
        public static Map<Integer,MessageTypeEnum> typeMap = new HashMap<>();
    }

}
